Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  List  the  Results  of  the  Last  System  Restore  

 Content of List the Results of the Last System Restore.vbs
MD5 Hash: D35831CF5D604D3E1A32945F28093B8C
' Description: Returns the results (failed, succeeded, interrupted) of the last system restore performed on a computer.


strComputer = "."

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default")

Set objItem = objWMIService.Get("SystemRestore")
errResults = objItem.GetLastRestoreStatus()

Select Case errResults
Case 0 strRestoreStatus = "The last restore failed."
Case 1 strRestoreStatus = "The last restore was successful."
Case 2 strRestoreStatus = "The last restore was interrupted."
End Select

Wscript.Echo strRestoreStatus

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a